
/*---------------------------------------------------------
   Initializes the effect. The data is a table of data 
   which was passed from the server.
---------------------------------------------------------*/
function EFFECT:Init( data )
	
	local pos = data:GetOrigin()
		
	local emitter = ParticleEmitter( pos )
	for i=0, math.random(7,10) do
		local particle = emitter:Add( "effects/spark", pos )
		particle:SetVelocity( Vector(math.Rand(-1,1),math.Rand(-1,1),math.Rand(-0.1,1.5)) * 100 )
		particle:SetColor( 0, 250, 0, 250 )
		particle:SetDieTime( math.Rand( 2, 4 ) )
		particle:SetStartAlpha( math.Rand( 100, 150 ) )
		particle:SetEndAlpha( 0 )
		if math.random(1,3) == 1 then
			particle:SetStartSize( math.Rand( 2, 2.5 ) )
		else
			particle:SetStartSize( math.Rand( 1, 1.5 ) )
		end
		particle:SetEndSize( 0 )
		particle:SetRoll( math.Rand(0, 360) )
		particle:SetRollDelta( 0 )
				
		particle:SetAirResistance( 50 )
		particle:SetGravity( Vector(0,0,-450) )
		particle:SetCollide( true )
		particle:SetBounce( math.Rand( 0.9, 1.1 ) )
	end
	emitter:Finish()
end


/*---------------------------------------------------------
   THINK
---------------------------------------------------------*/
function EFFECT:Think( )
	return false
end

/*---------------------------------------------------------
   Draw the effect
---------------------------------------------------------*/
function EFFECT:Render()
end
